package com.unc.allergyex;

import java.util.ArrayList;
import java.util.HashMap;

import com.unc.allergyex.objects.AllergyPreference;
import com.unc.allergyex.objects.db.*;

/**
 * This is the Application class.  We are using it to hold data that
 * needs to be available on multiple screens. 
 * @author Phillip
 */
public class Application extends android.app.Application {

	public static boolean isFreshInstall;
	public static Restaurant restaurant;
	public static Allergen[] allergenList;
	public static Restaurant[] restaurantList;
	public static Restaurant[] ambiguousRestaurantList;
	public static Restaurant[] mapSearchRestaurantList;
	public static ArrayList<AllergyPreference> allergyPreferenceList;
	public static HashMap<String, Category> catMap;
	public static HashMap<String, Dish> dishMap;
	public static HashMap<String, Component> compMap;
	public static HashMap<String, Allergen> allMap;
	
	
	/**Initialize necessary fields.
	 * @author Phillip
	 * @see android.app.Application#onCreate()
	 */
	public void onCreate(){
		super.onCreate();
		
		catMap = new HashMap<String, Category>();
		dishMap = new HashMap<String, Dish>();
		compMap = new HashMap<String, Component>();
		allMap = new HashMap<String, Allergen>();
		allergyPreferenceList = new ArrayList<AllergyPreference>();
		
	}
}
